package com.zeroup.matrix;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import com.blankj.utilcode.util.StringUtils;
import com.zeroup.matrix.appplication.ZeroneAppliction;
import com.zeroup.matrix.bean.UserInfo;
import com.zeroup.matrix.utile.PermissionsUtil;

import org.kymjs.kjframe.KJActivity;
import org.kymjs.kjframe.KJDB;
import org.kymjs.kjframe.ui.BindView;
import org.kymjs.kjframe.utils.KJLoger;

import java.util.List;

public class DouYinLoginActivity extends BaseActivity {

    @BindView(id = R.id.dy_login,click = true)
    LinearLayout dy_login;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestPermissions(PermissionsUtil.PERMISSION_ALL, 1);
        String token = getToken();
        KJLoger.debug("token==>{}",token);
        if(!StringUtils.isEmpty(token)){
            Intent mIntent = new Intent(DouYinLoginActivity.this, VediosActivity.class);
            mIntent.putExtra("token",token);
            startActivity(mIntent);
            finish();
        }

    }


    @Override
    public void setRootView() {
        setContentView(R.layout.dou_yin_login);
    }

    @SuppressLint("NonConstantResourceId")
    @Override
    public void widgetClick(View v) {
        super.widgetClick(v);
        if (v.getId() == R.id.dy_login) {
            ZeroneAppliction.toDouyin(this);
            finish();
        }
    }
}